<%
	render("views.layouts.head")
	render("views.layouts.navbar")
%>

<h1><%= head_title %></h1>

<% if message then %>
	<p><mark><%= message %></mark></p>
<% end %>

<form method="POST" action="<%= url_for("upload_article") %>" enctype="multipart/form-data">
	<input type="hidden" name="csrf_token" value="<%= csrf_token %>">
	<div>
		<label for="title"><b>Título del artículo</b></label>
	</div>
	<div>
		<input type="text" id="title" name="title" minlength="1" maxlength="243" size="80" required>
	</div>
	<div>
		<label for="synopsis"><b>Resumen del artículo</b></label>
	</div>
	<div>
		<textarea type="text" id="synopsis" name="synopsis" minlength="1" maxlength="255" rows="3" cols="100" required></textarea>
	</div>
	<div>
		<label for="content"><b>Contenido del artículo (<a href="https://www.markdownguide.org/basic-syntax/" target="_blank">formato Markdown</a>)</b></label>
	</div>
	<div>
		<textarea type="text" id="content" name="content" minlength="1" maxlength="<%= max_articles_size %>" rows="32" cols="100" required></textarea>
	</div>
	<div>
		<input type="submit" name="submit" value="Enviar">
	</div>
</form>

<% render("views.layouts.footer") %>